package com.ziqikeji.bridge;

/**
 * 桥接模式测试类.
 */
public class BridgeTest {
    public static void main(String[] args) {
        Abstraction abstraction = new RefinedAbstraction();

        // 调用第一个实现类A
        abstraction.setImplementor(new ConcreteImplementorA());
        abstraction.operation();

        // 调用第一个实现类B
        abstraction.setImplementor(new ConcreteImplementorB());
        abstraction.operation();
    }
}
